package com.ws.haungjia.mapper;

import com.ws.haungjia.Bean.Shangjia;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface ShangjiaMapper {

    @Select("select * from shangjia")
    public List<Shangjia> cha();

    @Insert("insert into shangjia(sname,slianxi) values(#{name},#{lianxi})")
    int zengjia(@Param("name") String name, @Param("lianxi")String lianxi);

    @Delete("delete from shangjia where sid=#{id}")
    int shan(int id);

    @Select("select * from shangjia where sid=#{id}")
    Shangjia huixian(int id);

    @Update("update shangjia set sname=#{sname},slianxi=#{slianxi} where sid=#{id}")
    int xiugai(@Param("sname") String sname,@Param("slianxi") String slianxi,@Param("id")int id);
}
